package com.example.netty.service.hycyw;

import com.example.netty.common.FluxQuery;
import com.example.netty.pojo.Hycyw;
import com.influxdb.client.InfluxDBClient;
import com.influxdb.client.WriteApiBlocking;
import com.influxdb.client.domain.WritePrecision;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HycywServiceImpl {
    @Autowired
    InfluxDBClient influxDBClient;

    public void add(String bucketName,Hycyw hycyw){
        WriteApiBlocking writeApiBlocking = influxDBClient.getWriteApiBlocking();
        FluxQuery.add(bucketName,writeApiBlocking,hycyw);
    }
}
